package com.xinzhi.controller;

import com.xinzhi.pojo.dto.ByCardRequest;
import com.xinzhi.service.IByCardNumberService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 根据卡号查询的控制器
 */
@RestController
public class ByCardNumberController {
    @Autowired
    private IByCardNumberService ByCardNumberService;

    /**
     * 根据卡号查询
     * @param byCardRequest 卡号请求参数
     * @return
     */
    @PostMapping("/getByCardNumber")
    public Result getByCardNumber(@RequestBody ByCardRequest byCardRequest) {
        return ByCardNumberService.getByCardNumber(byCardRequest);
    }
}
